home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / CDictionary 1.0 / CSmartButton.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-30  |  1.1 KB  |  37 lines  |  [TEXT/KAHL]

  1. /*****************************************************************************
  2.     CSmartButton - subclass of CButton with some minor enhancements. These are:
  3.     
  4.         •    Can be enabled, disabled with Enable, Disable, or SetEnable
  5.         •    Provides SetHilite method to call HiliteControl
  6.         •    Overrides the default Activate() to invalidate instead of
  7.             redrawing the control. The standard methods handles non-rectangular
  8.             controls on non-white backgrounds poorly.
  9.             
  10.     by Dan Podwall - you may do anything you please with this code except
  11.     charge for it, with the exception of normal network download charges.
  12.  
  13. /*****************************************************************************/
  14. #define _H_CSmartButton
  15.  
  16. #include "CButton.h"
  17. #include "defs.h"
  18.  
  19. struct CSmartButton : CButton
  20. {
  21.     Boolean enabled;
  22.     
  23.     virtual void ISmartButton(Int16    CNTLid,    CView *anEnclosure,
  24.                     CBureaucrat    *aSupervisor);
  25.     
  26.     virtual void Draw( Rect *area);
  27.  
  28.     virtual void Activate( void);
  29.     virtual void Deactivate( void);
  30.     
  31.     virtual void SetHilite( Int16 hiliteVal);
  32.     
  33.     virtual void Enable( void);
  34.     virtual void Disable( void);
  35.     virtual void SetEnable( Int16 enableFlag);
  36.     
  37. };